<?php $sessao = new Zend_Session_Namespace('Parametros'); ?>
<html lang="pt-br">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</head>
<body>
    <div class="pagina">
        <?php
        $count = 0;
        $total = count($this->texto) - 1;
        foreach($this->texto as $key => $row) { 
            $count ++;
            $img = '';
            $imgs = 'public/upload/aluno/'.$row['ALU_ID'].'_crt.*';
            foreach (glob($imgs) as $src) {
                $img = $src;
            }
            
            if($row['ALU_DATNAS'] == '0000-00-00') $row['ALU_DATNAS'] = '';
            if($row['ALU_PAIDATNAS'] == '0000-00-00') $row['ALU_PAIDATNAS'] = '';
            if($row['ALU_MAEDATNAS'] == '0000-00-00') $row['ALU_MAEDATNAS'] = '';
            
        ?>
        
        <div id="content-form">
            <div class="titulo">FICHA DE CADASTRO</div>
            <form id="form_aluno" action="" method="post" enctype="multipart/form-data">     
                <div class="row">
                    <div class="foto_aluno">
                        <?php if(strlen($img) > 5){ ?>
                            <img class="logo" src="<?php echo '/'.$img; ?>" />
                        <?php } ?>
                    </div>
                    <div class="ln">
                        <input type="text" value="NOME: <?php echo $row['ALU_NOM']; ?>" class="t70 cod" />
                        <input type="text" value="CÓDIGO: <?php echo $row['ALU_ID']; ?>" class="t19 cod"/>
                    </div>
                    <div class="ln"><input type="text" value="TURMA: <?php echo ''; ?>" class="t90" /></div>
                    <div class="ln">
                        <input type="text" value="CPF: <?php echo $row['ALU_CPF']; ?>" class="t33"  />
                        <input type="text" value="RG: <?php echo $row['ALU_RG']; ?>" class="t33" />
                        <input type="text" value="NASC.: <?php echo Datetools::amd_dma($row['ALU_DATNAS']); ?>" class="t33" />
                    </div>
                    <div class="ln">
                        <input type="text"  value="CEP: <?php echo $row['ALU_CEP']; ?>" class="t29"  />
                        <input type="text"  value="ENDEREÇO: <?php echo $row['ALU_END']; ?>" class="t70" />
                    </div>
                    <div class="ln">
                        <input type="text" value="BAIRRO: <?php echo $row['ALU_BAI']; ?>" class="t40"  />
                        <input type="text" value="CIDADE: <?php echo $row['ALU_CID']; ?>" class="t40"  /> 
                        <input type="text" value="UF: <?php echo $row['ALU_UF']; ?>" maxlength="2" class="t20"  />
                    </div>
                    <div class="ln">
                        <input type="text" value="TELEFONE: <?php echo $row['ALU_TEL']; ?>" class="t50" />
                        <input type="text" value="TELEFONE 2: <?php echo $row['ALU_CEL']; ?>" class="t50" />
                    </div>
                    <div class="ln"><strong>Email:</strong> <input type="text" id="ALU_EML" name="ALU_EML" value="E-MAIL: <?php echo $row['ALU_EML']; ?>" class="email"  /></div>
                    <div class="ln"><strong>Facebook:</strong> <input type="text" id="ALU_FCB" name="ALU_FCB" value="FACEBOOK: <?php echo $row['ALU_FCB']; ?>"  /></div>
                </div>
                <br>
                <div class="row">
                    <div class="ln"><strong>Pai:</strong> <input type="text" id="ALU_PAINOM" name="ALU_PAINOM" value="PAI: <?php echo $row['ALU_PAINOM']; ?>"  /></div>
                    <div class="ln">
                        <input type="text" value="CPF: <?php echo $row['ALU_PAICPF']; ?>" class="t33"  />
                        <input type="text" value="NASC.: <?php echo Datetools::amd_dma($row['ALU_PAIDATNAS']); ?>" class="t33" />
                        <input type="text" value="TELEFONE: <?php echo $row['ALU_PAITEL']; ?>" class="t33" />
                    </div>
                    <div class="ln"><strong>Email:</strong> <input type="text" id="ALU_PAIEML" name="ALU_PAIEML" value="E-MAIL: <?php echo $row['ALU_PAIEML']; ?>" class="email"  /></div>
                    <div class="ln" id="div_ALU_PAIPRF"><strong>Profissão:</strong> 
                    <?php
                        foreach($this->prf as $r){  
                            if($r['PRF_ID'] == $row['ALU_PAIPRF']){
                                $PRF_NOM = $r['PRF_NOM'];
                                break;
                            }              
                        }
                    ?>
                        <input type="text" id="ALU_PAIPRF" name="ALU_PAIPRF" value="PROFISSÃO: <?php echo $PRF_NOM; ?>" required="" />
                    </div>
                </div>
                <div class="row">
                    <div class="ln"><strong>Mãe:</strong> <input type="text" id="ALU_MAENOM" name="ALU_MAENOM" value="MÃE: <?php echo $row['ALU_MAENOM']; ?>" /></div>
                    <div class="ln">
                        <input type="text" value="CPF: <?php echo $row['ALU_MAECPF']; ?>" class="t33" />
                        <input type="text" value="NASC.: <?php echo Datetools::amd_dma($row['ALU_MAEDATNAS']); ?>" class="t33"/>
                        <input type="text" value="TEEFONE: <?php echo $row['ALU_MAETEL']; ?>" class="t33" />
                    </div>
                    <div class="ln"><strong>Email:</strong> <input type="text" id="ALU_MAEEML" name="ALU_MAEEML" value="E-MAIL: <?php echo $row['ALU_MAEEML']; ?>" class="email"  /></div>
                    <div class="ln" id="div_ALU_MAEPRF"><strong>Profissão:</strong> 
                    <?php
                        foreach($this->prf as $r){  
                            if($r['PRF_ID'] == $row['ALU_MAEPRF']){
                                $PRF_NOM = $r['PRF_NOM'];
                                break;
                            }              
                        }
                    ?>
                        <input type="text" id="ALU_MAEPRF" name="ALU_MAEPRF" value="PROFISSÃO: <?php echo $PRF_NOM; ?>" required="" />
                    </div>
                </div>
                <?php  
                    $arr = array(
                        'ENSINO FUNDAMENTAL',
                        'ENSINO MÉDIO',
                        'PRÉ-VESTIBULAR',
                        'GRADUAÇÃO',
                    );
                    
                    foreach($arr as $ar){
                ?>
                <div class="row">
                    <div class="ln"><?php echo $ar; ?></div>
                    <div class="ln">
                        <input type="text" value="NOME INST.: <?php echo ''; ?>" class="t70" />
                        <input type="text" value="ANO SAÍDA/CONC.: <?php echo ''; ?>" class="t29"/>
                    </div>
                    <div class="ln txt">
                        <input type="checkbox" value="<?php echo ''; ?>" /> PÚBLICA
                        &nbsp;&nbsp;
                        <input type="checkbox" value="<?php echo ''; ?>" /> PARTICULAR
                    </div>
                </div>
                <?php  }?>
                
                <div class="row borda_fim">
                    <div class="ln">Opções de Vestibular</div>
                    <div class="ln">
                        <input type="text" value="CURSOS DE GRADUAÇÃO: <?php echo ''; ?>" />
                    </div>
                    <div class="ln">
                        <input type="text" value="INSTITUIÇÕES DE ENSINO.: <?php echo ''; ?>" />
                    </div>
                </div>
                
                <div class="logo_bottom">
                    <img src="<?php echo $this->urlbase.'/public/media/images/logo_rel.png'; ?>" />
                </div>
            </form>
            <?php 
                //if($count <= $total) echo '<div class="espaco"></div>';
            ?>
        </div>
        <?php 
            /*
            if($count == 3 && $total > $key){
                $count = 0;
                echo '<div class="espaco"></div>';
            }
            */
        } ?>
        
    </div>

<?php
/* 
folha a4
width: 2480px;
    height: 3508px;
 */
?>

<style>

@font-face{ 
    font-family: 'MyriadProBold';
    src: url('<?php echo $this->urlbase?>/public/media/fonts/MyriadPro-BoldCond.otf'); 
}

@font-face{ 
    font-family: 'MyriadPro';
    src: url('<?php echo $this->urlbase?>/public/media/fonts/MyriadPro-Regular.otf'); 
}

@font-face{ 
    font-family: 'MyriadProLight';
    src: url('<?php echo $this->urlbase?>/public/media/fonts/MyriadPro-Light.otf'); 
}

@font-face{ 
    font-family: 'Century Gothic';
    src: url('<?php echo $this->urlbase?>/public/media/fonts/Century Gothic.ttff'); 
}

.pagina{
    font-family: 'MyriadPro'; 
    width: 1000px;
    color:#000;
    font-size: 15px;
    margin-left: 115px;
}  

.espaco{
    display: block;
    height: 105px;
    clear: both;
    width: 800px;
}

.logo_bottom{
    float: left;
    width: 800px;
    margin-top: 80px; // 240px;
    text-align: center;
}

.titulo{
    font-weight: bold;
    font-size: 20px;
}
input,.txt{
    font-size: 18px;
    font-family: 'MyriadPro';    
}

.foto_aluno{
    float: left;
    width: 75px;
    height: 95px;
    border: 1px solid #000;
    background-color: #FFF;     
    margin-top: 5px;
    overflow: hidden;
    margin-right: 5px;
    margin-left: 5px; 
}

strong{ display: none; }

#content-form{
    overflow: hidden;
    height: 1550px;
}

.cod{
    height: 55px;
}

.row{
    float: left; 
    width: 800px; 
    color: #000; 
    //background-color: #ebecec; 
    border: 1px solid #000;
    padding: 5px 10px;
    margin-bottom: -1px;
}

.ln{
    padding: 5px;
}
input[type='text'], input[type='password'], select,textarea{
    border: 1px solid #000;
    padding: 4px 8px !important;
    background-color: #fff !important;
    width: 100%;
}
.t70{
    width: 70% !important;
}
.t33{
    width: 33% !important;
}
.t29{
    width: 29.3% !important;
}
.t40{
    width: 40% !important;
}
.t20{
    width: 18.9% !important;
}
.t50{
    width: 49.7% !important;
}
.t90{
    width: 89.6% !important;
}
.t19{
    width: 19.2% !important;
}
.t22{
    width: 22.8% !important;
}
.h_fot{
    height: 60px;   
}

.borda_fim{
    margin-bottom: 0px;
}




</style>
<script>  
window.print(); 
</script>

<body>
</html>
